<?php
$base = "http://" . $_SERVER['SERVER_NAME'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
    <head>        
        <meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>

        <meta name="description" content=""></meta>
        <meta name="author" content=""></meta>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
        <!-- Le styles -->
        <script src="<?= $base ?>/bootstrap/js/jquery.min.js"></script>
        <link href="<?= $base ?>/bootstrap/css/bootstrap.css" rel="stylesheet" />        
        <script src="<?= $base ?>/bootstrap/js/bootstrap.js"></script>
        <link href="<?= $base ?>/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"/>
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
        </style>        

        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="../assets/js/html5shiv.js"></script>
        <![endif]-->

        <!-- Fav and touch icons -->    
        <!--<link rel="shortcut icon" href="../assets/ico/favicon.png">-->
    </head>

    <body>

        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="brand" href="<?= $this->url(array(), 'home'); ?>"><i class="icon-user icon-white"></i> Sample Comment & Profile View </a>
                    <div class="nav-collapse collapse">
                        <ul class="nav pull-right">                            
                            <li key="home"><a href="<?= $this->url(array(), 'home'); ?>"><i class="icon-home icon-white"></i> Home</a></li>
                            <?php
                            if (Zend_Auth::getInstance()->hasIdentity()) {
                                $auth = Zend_Auth::getInstance();
                                $data = $auth->getIdentity();
                                $email = $data->email;
                                ?>
                                <li class="dropdown">
                                    <a href="#" key="user-index" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-white icon-user"></i> Welcome, <?= $email ?> <b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="<?= $this->url(array(), 'user-profile-update'); ?>"><i class="icon-user"></i> Profile</a></li>
                                        <li><a href="<?= $this->url(array(), 'user-password'); ?>"><i class="icon-lock"></i> Change Password</a></li>                                        
                                        <li><a href="<?= $this->url(array(), 'user-comment'); ?>"><i class="icon-edit"></i> Comment</a></li>
                                        <li class="divider"></li>
                                        <li><a href="<?= $this->url(array(), 'users-list'); ?>"><i class="icon-list-alt"></i> List of Users</a></li>
                                        <li class="divider"></li>
                                        <li><a href="<?= $this->url(array(), 'user-logout'); ?>"><i class="icon-remove-circle"></i> Logout</a></li>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li key="login"><a href="<?= $this->url(array(), 'user-login'); ?>"><i class="icon-white icon-ok-sign"></i> Login</a></li>
                            <?php } ?>
                        </ul>
                    </div><!--/.nav-collapse -->
                </div>
            </div>
        </div>

        <div class="container">                                    
            <?php echo $this->layout()->content ?><br/><br/>


            <footer><hr/>
                &copy; SpearBall Inc. 2013
            </footer>

        </div> <!-- /container -->
    </body>
</html>
